import {IHandlerFilter} from "pinus/lib/interfaces/IHandlerFilter";
import {RouteRecord} from "pinus/lib/util/constants";
import {FrontendOrBackendSession} from "pinus/lib/server/server";
import {HandlerCallback} from "pinus/lib/common/service/handlerService";

export class TimeOutFilter implements IHandlerFilter{

    public before(route:RouteRecord,msg:any, session:FrontendOrBackendSession, next:HandlerCallback){

        // logger.info("before.route --> " , route);
        // logger.info("before.msg --> " , msg);
        // logger.info("before.next --> " , next);

        next(undefined);
    }

    public after(err:Error,route:RouteRecord,msg:any, session:FrontendOrBackendSession,resp:any, next:HandlerCallback){

        // logger.info("after.route --> " , route);
        // logger.info("after.msg --> " , msg);
        // logger.info("after.err --> " , err);
        // logger.info("after.next --> " , next);

        next(err);
    }
}
